/* 

Replication files for:
"Evaluating the Effect of Descriptive Norms on Political Tolerance"
By Fabian G. Neuner and Mark D. Ramirez
Published in American Politics Research

*/

*******************************************************************************
*****************************    Study 2   ************************************
*******************************************************************************

* Set scheme for figures

set scheme plotplain

* Load data

use "Study2_data.dta"
	des, short

* Examine respondents' disliked groups

tab dislike	
tab dislike_group

********************** Study 2 Recodes ***********************

* Tolerance (Recode higher values are tolerant)

recode q17_1 1=5 2=4 4=2 5=1
recode q17_2 1=5 2=4 4=2 5=1
recode q17_3 1=5 2=4 4=2 5=1

recode q10_1 1=5 2=4 4=2 5=1
recode q10_2 1=5 2=4 4=2 5=1
recode q10_3 1=5 2=4 4=2 5=1

recode q23_1 1=5 2=4 4=2 5=1
recode q23_2 1=5 2=4 4=2 5=1
recode q23_3 1=5 2=4 4=2 5=1

recode q26_1 1=5 2=4 4=2 5=1
recode q26_2 1=5 2=4 4=2 5=1
recode q26_3 1=5 2=4 4=2 5=1

alpha q17_1 q17_2 q17_3, gen(outcomes_control)
alpha q10_1 q10_2 q10_3, gen(outcomes_intol1) 
alpha q23_1 q23_2 q23_3, gen(outcomes_intol2)
alpha q24_1 q24_2 q24_3, gen(outcomes_intol3) 
alpha q26_1 q26_2 q26_3, gen(outcomes_intol4) 

egen tolerance= rowtotal(outcomes_control outcomes_intol1 outcomes_intol2 outcomes_intol3 outcomes_intol4)
recode tolerance 0=. 

* Treatment indicator

gen treatment = .

** Control  
recode treatment .=1 if outcomes_control !=. 
** 80% (original wording) 
recode treatment .=2 if outcomes_intol1 !=. 
** 34% intolerant 
recode treatment .=3 if outcomes_intol2 !=.
** 80% revised wording  
recode treatment .=4 if outcomes_intol3 !=. 
** 61% intolerant 
recode treatment .=5 if outcomes_intol4 !=. 


* Collapse treatments (for appendix analysis)

gen t5 = treatment 
recode t5 1=0 2=1 3=1 4=1 5=1


* Rescaling 0-1

foreach x in tolerance polls {
sum `x'
gen `x'01 = (`x'-r(min))/(r(max)-r(min))
}


********************** Study 2 Analysis ***********************

* Figure 3

reg tolerance01 i.treatment 
est sto m2

coefplot, drop(_cons) xline(0) msymbol(O) levels(95 90) ///
 plotregion(fcolor(white) lcolor(gs10) lwidth(med)) ///
 ylabel(, /// y-axis label #s
labcolor(gs4) tlcolor() tlwidth(thin) labsize(small) nogrid) ///
xlabel( -.1 0 .1 .1 .2 .3, /// x-axis label #s
labcolor(gs4) tlcolor() tlwidth(thin) labsize(small) nogrid) ///
 xtitle("ATE of each Treatment vs. Control", color(black)) ///
 mcolor(black) mlcolor(black)  /// point estimate color options
ciopts(lwidth(*0.75 *1.5) lcolor(black black)) ///
coeflabels(2.treatment = `" 80% Intolerant"' 3.treatment = `"34% Intolerant"' 4.treatment = `"80% Intolerant*"' 5.treatment = `"61% Intolerant"') ///
grid(none) //
graph export Figure3.pdf


* Table A.5

reg tolerance01 i.treatment 
est sto m1

esttab m1 using TableA5.rtf, replace se label nonumber title("Effect of Norms of Intolerance on Tolerance (Study 2)") mtitle("Model 1")  b(%9.2f) star(* 0.10 ** 0.05 ) r2 wide


* Table A.6 

reg tolerance01 t5##c.polls01 
est sto m2

esttab m2 using TableA6.rtf, replace se label nonumber title("Effect of Norms of Intolerance on Tolerance and Belief in Polling (Study 2)") mtitle("Model 1")  b(%9.2f) star(* 0.10 ** 0.05 ) r2 wide

